// ValidationAspects
// Written by Mike Saunders
// Released under Microsoft Public License (Ms-PL)
using System;

namespace ValidationAspects.Exceptions
{
	public class ValidateNotNullOrWhiteSpaceException : ValidationException
	{
		public static Func<ValidateNotNullOrWhiteSpaceException, string> MessageFormat { get; set; }

        static ValidateNotNullOrWhiteSpaceException()
		{
			ResetMessageFormat();
		}

		public static void ResetMessageFormat()
		{
			MessageFormat = e => e.GetValidationTargetName() + " is required.";
		}

		public override string Message
		{
			get { return MessageFormat(this); }
		}
	}
}